package com.mryan.ps_auth.properties;

import lombok.Data;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;

/**
 * @BelongsProject: ps_cloud
 * @BelongsPackage: com.mryan.ps_auth.properties
 * @Author: Yan
 * @CreateTime: 2021-04-25 19:32
 * @Description:
 */

@Data
@SpringBootConfiguration
@PropertySource(value = {"classpath:ps-auth.properties"})
@ConfigurationProperties(prefix = "ps.auth")
public class PSAuthProperties {

	//	认证服务器可以根据多种Client来发放对应的令牌,所以这里是数组形式
	private PSClientsProperties[] clients = {};
	private int accessTokenValiditySeconds = 60 * 60 * 24;
	private int refreshTokenValiditySeconds = 60 * 60 * 24 * 7;
	// 免认证路径
	private String anonUrl;
	//验证码配置类
	private PSValidateCodeProperties code = new PSValidateCodeProperties();
}
